    <div class="toppage">
    	<span class="left">
        	<select style="width: 130px;" id="action">
            	<option value="1">Chọn hành động</option>
                <option value="delete">Xóa</option>
                <option value="active">Kích hoạt</option>
                <option value="pending">Hủy kích hoạt</option>                
            </select>
            <input onclick="$('[name=action]').val($('#action').val()); $('#action_form').submit()" value="Apply" class="btn" type="button">        	
        </span>
        <span class="btnadd">
        <a onclick="open_form('<?php echo action_link('add'); ?>')" href="javascript:void(0)">Thêm mới</a>
        </span>
    </div>
    <div class="tableout">
    
    	<form method="post" action="<?php echo action_link('do_action'); ?>" id="action_form">

		<div class="title1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" type="checkbox"></div>            
            <div class="column" style="width: 10%;">STT</div>
            <div class="column" style="width: 50%;">Tên hãng sản phẩm</div>
            <!-- <div class="column" style="width: 20%;">Order</div> -->
            <div class="column" style="width: 8%;">Trạng thái</div>
        </div>
        
        <?php if(count($company) > 0){ ?>
        <?php $limit = $this->config->item('company', 'limit'); ?>
        <?php 
        	$n = 0;
        	foreach($company as $i => $com):
	        $n++;
	        $next_order=$i;
	        $back_order=$i+1;
	        if($n>1)
	        {
	         	$next_order = intval($i-1);
	        }
	        if($n==count($company))
	        {
	          	$back_order = intval($i);
	        } 
        ?>
        <div class="linecate2" id="linecate2">
        	<div class="column" style="width: 2%;"><input name="id[]" value="<?php echo $com->id; ?>" type="checkbox" /></div>
            <div class="column" style="width: 10%;">
            	<a href="javascript:;" class="art"><?php echo $i+1; ?></a><br>
            </div>            
            <div id="row_<?php echo $com->id;?>">            
	            <div class="column" style="width: 50%;" onmouseover="Hovercat('<?php echo $com->id; ?>')" onmouseout="Outcat('<?php echo $com->id; ?>')">
	            	<a href="javascript:;" class="art"><?php echo $com->name; ?></a>
	                <div class="action" id="neocat-<?php echo $com->id; ?>">
	                    <img src="<?php echo img_link('edit.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="open_form('<?php echo action_link('edit/'.$com->id); ?>')">Sửa</a><img src="<?php echo img_link('delete.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="company_delete('<?php echo $com->id; ?>')"><font color="#be0000">Xóa</font></a>
	                </div>
	            </div>
	            <!-- 
	            <div class="column" style="width:20%;">
                    <input type="text" name="com[<?php echo $i;?>][order]" id="com_<?php echo $i;?>" value="<?php echo $com->order;?>" style="width:45px; float:left;" onkeypress="enter_go(event);" />
                    <span class="updown">
                        <a href="javascript:;" onclick="order_step('com_<?php echo $i;?>',<?php echo $company[$next_order]->order;?>);">
                            <img src="<?php echo img_link('up.gif','admin')?>" title="up" />
                        </a>
                        <a href="javascript:void(0);" onclick="order_step('com_<?php echo $i;?>',<?php echo $company[$back_order]->order;?>);">
                            <img src="<?php echo img_link('down.gif','admin')?>" title="down" />
                        </a>
                    </span>
                </div>  
                 -->
                            
            	<div class="column" style="width: 8%;">
		            <?php if($com->status == 'no'): ?>
					<a href="javascript:void(0);" onclick="company_status('<?php echo $com->id;?>', 'yes')"><img src="<?php echo img_link('pending.png', 'admin'); ?>" class="icon png" title="Kích hoạt" alt="Kích hoạt"></a>
		            <?php else: ?>
					<a href="javascript:void(0);" onclick="company_status('<?php echo $com->id;?>', 'no')"><img src="<?php echo img_link('active.png', 'admin'); ?>" class="icon png" title="Hủy kích hoạt" alt="Hủy kích hoạt"></a>
		            <?php endif; ?>
	            </div>
            </div>
        </div>
		<?php endforeach; ?>
		<?php } ?>

        <div class="bottom1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" value="" type="checkbox"></div>
            <div class="column" style="width: 50%;">
            	<select style="width: 130px;" id="action_name" name="action">
                    <option value="">Chọn hành động</option>
                    <option value="delete">Xóa</option>
                    <option value="active">Kích hoạt</option>
                    <option value="pending">Hủy kích hoạt</option>                    
                </select>
                <input value="Apply" class="btn" type="submit">
            </div>
            <span class="right1">
            	
                <div class="pagination">                	
                    <ul>
                    <?php echo $pagnav; ?>
                    </ul>
                </div>
            </span>
        </div>
        
        </form>
        
    </div>

<script>
$('#action_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		load_content('company_list', '<?php echo current_link(); ?>', true);
    	}
    	else show_error('div_message', msg)
    }
});
</script>